//
//  DestinationDetailTableViewCell.m
//  TeamProject_Travel
//
//  Created by lanou3g on 16/3/29.
//  Copyright © 2016年 lanou3g. All rights reserved.
//

#import "DestinationDetailTableViewCell.h"

@implementation DestinationDetailTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self initLayout];
    }
    return self;
}

- (void)initLayout{
    self.titleLabel = [[UILabel alloc]initWithFrame:CGRectMake(20, 20, [UIScreen mainScreen].bounds.size.width - 40, 80)];
    self.titleLabel.backgroundColor = [UIColor cyanColor];
    [self.contentView addSubview:self.titleLabel];
    
    UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc]init];
    layout.scrollDirection = UICollectionViewScrollDirectionHorizontal;
    layout.minimumInteritemSpacing = 5;
    self.imageCollectionView = [[UICollectionView alloc]initWithFrame:CGRectMake(0, CGRectGetMaxY(self.titleLabel.frame), [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.width / 3 + 20) collectionViewLayout:layout];
    self.imageCollectionView.backgroundColor = [UIColor yellowColor];
    [self.contentView addSubview:self.imageCollectionView];
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
